Socket
Socket
Sign inDemoInstall

requires

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

requires

like node-detective but trades AST correctness for speed


Version published
Weekly downloads
2.7K
increased by11.38%
Maintainers
1
Weekly downloads
 
Created
Source

requires

Super simple require parser, trades correctness for speed. If you do weird things like concat strings for require()s this will fail.

Installation

$ npm install requires

Example

js:

var a = require('./a.js');
var b = require('./something/here/whoop');
var c = require("something");

parser output:

[
  {
    "string": "require('./a.js')",
    "path": "./a.js",
    "index": 9
  },
  {
    "string": "require('./something/here/whoop')",
    "path": "./something/here/whoop",
    "index": 36
  },
  {
    "string": "require(\"something\")",
    "path": "something",
    "index": 79
  }
]

License

MIT

Keywords

FAQs

Package last updated on 07 Oct 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc